package com.xiaobai.common;

import lombok.Data;

/**
 * @description:
 * @author: 小白白
 * @create: 2021-11-27
 **/

@Data
public class ServerItemResult {

    public ServerItemResult() {

    }

    public ServerItemResult(boolean flag, String msg) {
        this.flag = flag;
        this.msg = msg;
    }

    private boolean flag;

    private String msg;

    public static ServerItemResult error(String errorMsg) {
        return new ServerItemResult(false, errorMsg);
    }

    public static ServerItemResult ok(String msg) {
        return new ServerItemResult(true, msg);
    }

}
